package valve_test.logic;

import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
/**
 * Created with IntelliJ IDEA.
 * User: Shinigami
 * Date: 11.03.14
 * Time: 18:00
 * To change this template use File | Settings | File Templates.
 */

@Entity
@Table(name="valves")
public class valves {

    private Long id;
    private String v_name;
    private Long input;
    private Long output;
    private boolean state;

    public valves(){
        id = null;
        v_name = null;
        input = new Long(1);
        output = new Long(1);
        state = false;
    }

    public valves(valves s){
        id = s.getv_id();
        v_name = s.getv_name();
        input = s.getinput();
        output = s.getoutput();
        state = s.getState();
    }

    @Id
    @GeneratedValue(generator="increment")
    @GenericGenerator(name="increment", strategy = "increment")
    @Column(name="id")
    public Long getv_id() {
        return id;
    }

    @Column(name="v_name")
    public String getv_name(){
        return v_name;
    }

    @Column(name="input")
    public Long getinput(){
        return input;
    }

    @Column(name="output")
    public Long getoutput(){
        return output;
    }

    @Column(name="state")
    public boolean getState() {
        return state;
    }

    public void setV_id(Long i){
        id = i;
    }

    public void setV_name(String s){
        v_name = s;
    }

    public void setInput(Long l){
        input = l;
    }

    public void setOutput(Long l){
        output = l;
    }

    public void setState(boolean b) {
        state = b;
    }
}
